package com.partners.dao.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.stereotype.Component;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * @author liangyongle
 * @date 2018-12-14
 */
@Setter
@Getter
public class LoginInputDTO {

    private Integer id;

    @NotNull(message="用户名不能为空")
    private String username;

    @NotNull(message="手机号码不能为空")
    private long phone;

    @NotNull(message="验证码不能为空")
    @JsonProperty("verify_code")
    private Integer verifyCode;

    @JsonProperty("role_name")
    private String roleName;

    private String openid;

    @Override
    public String toString() {
        return "LoginInputDTO{" +
            "id=" + id +
            ", username='" + username + '\'' +
            ", phone=" + phone +
            ", verifyCode=" + verifyCode +
            ", roleName='" + roleName + '\'' +
            ", openid='" + openid + '\'' +
            '}';
    }
}
